3.41 \(\int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx\)

Optimal. Leaf size=117 \[ \frac{a^3 A c^3 \sin (e+f x) \cos ^5(e+f x)}{6 f}+\frac{5 a^3 A c^3 \sin (e+f x) \cos ^3(e+f x)}{24 f}+\frac{5 a^3 A c^3 \sin (e+f x) \cos (e+f x)}{16 f}+\frac{5}{16} a^3 A c^3 x-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f} \]

[Out]

(5*a^3*A*c^3*x)/16 - (a^3*B*c^3*Cos[e + f*x]^7)/(7*f) + (5*a^3*A*c^3*Cos[e + f*x]*Sin[e + f*x])/(16*f) + (5*a^
3*A*c^3*Cos[e + f*x]^3*Sin[e + f*x])/(24*f) + (a^3*A*c^3*Cos[e + f*x]^5*Sin[e + f*x])/(6*f)

________________________________________________________________________________________

Rubi [A]  time = 0.147686, antiderivative size = 117, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2967, 2669, 2635, 8} \[ \frac{a^3 A c^3 \sin (e+f x) \cos ^5(e+f x)}{6 f}+\frac{5 a^3 A c^3 \sin (e+f x) \cos ^3(e+f x)}{24 f}+\frac{5 a^3 A c^3 \sin (e+f x) \cos (e+f x)}{16 f}+\frac{5}{16} a^3 A c^3 x-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^3,x]

[Out]

(5*a^3*A*c^3*x)/16 - (a^3*B*c^3*Cos[e + f*x]^7)/(7*f) + (5*a^3*A*c^3*Cos[e + f*x]*Sin[e + f*x])/(16*f) + (5*a^
3*A*c^3*Cos[e + f*x]^3*Sin[e + f*x])/(24*f) + (a^3*A*c^3*Cos[e + f*x]^5*Sin[e + f*x])/(6*f)

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2669

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(b*(g*Cos[
e + f*x])^(p + 1))/(f*g*(p + 1)), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x]
&& (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx &=\left (a^3 c^3\right ) \int \cos ^6(e+f x) (A+B \sin (e+f x)) \, dx\\ &=-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f}+\left (a^3 A c^3\right ) \int \cos ^6(e+f x) \, dx\\ &=-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f}+\frac{a^3 A c^3 \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac{1}{6} \left (5 a^3 A c^3\right ) \int \cos ^4(e+f x) \, dx\\ &=-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f}+\frac{5 a^3 A c^3 \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac{a^3 A c^3 \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac{1}{8} \left (5 a^3 A c^3\right ) \int \cos ^2(e+f x) \, dx\\ &=-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f}+\frac{5 a^3 A c^3 \cos (e+f x) \sin (e+f x)}{16 f}+\frac{5 a^3 A c^3 \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac{a^3 A c^3 \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac{1}{16} \left (5 a^3 A c^3\right ) \int 1 \, dx\\ &=\frac{5}{16} a^3 A c^3 x-\frac{a^3 B c^3 \cos ^7(e+f x)}{7 f}+\frac{5 a^3 A c^3 \cos (e+f x) \sin (e+f x)}{16 f}+\frac{5 a^3 A c^3 \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac{a^3 A c^3 \cos ^5(e+f x) \sin (e+f x)}{6 f}\\ \end{align*}

Mathematica [A]  time = 0.225704, size = 64, normalized size = 0.55 \[ \frac{a^3 c^3 \left (7 A (45 \sin (2 (e+f x))+9 \sin (4 (e+f x))+\sin (6 (e+f x))+60 e+60 f x)-192 B \cos ^7(e+f x)\right )}{1344 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^3,x]

[Out]

(a^3*c^3*(-192*B*Cos[e + f*x]^7 + 7*A*(60*e + 60*f*x + 45*Sin[2*(e + f*x)] + 9*Sin[4*(e + f*x)] + Sin[6*(e + f
*x)])))/(1344*f)

________________________________________________________________________________________

Maple [B]  time = 0.024, size = 263, normalized size = 2.3 \begin{align*}{\frac{1}{f} \left ({\frac{B{a}^{3}{c}^{3}\cos \left ( fx+e \right ) }{7} \left ({\frac{16}{5}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{6}+{\frac{6\, \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{5}}+{\frac{8\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{5}} \right ) }-A{a}^{3}{c}^{3} \left ( -{\frac{\cos \left ( fx+e \right ) }{6} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{5}+{\frac{5\, \left ( \sin \left ( fx+e \right ) \right ) ^{3}}{4}}+{\frac{15\,\sin \left ( fx+e \right ) }{8}} \right ) }+{\frac{5\,fx}{16}}+{\frac{5\,e}{16}} \right ) -{\frac{3\,B{a}^{3}{c}^{3}\cos \left ( fx+e \right ) }{5} \left ({\frac{8}{3}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{4}+{\frac{4\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) }+3\,A{a}^{3}{c}^{3} \left ( -1/4\, \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+3/2\,\sin \left ( fx+e \right ) \right ) \cos \left ( fx+e \right ) +3/8\,fx+3/8\,e \right ) +B{a}^{3}{c}^{3} \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) -3\,A{a}^{3}{c}^{3} \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -B{a}^{3}{c}^{3}\cos \left ( fx+e \right ) +A{a}^{3}{c}^{3} \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x)

[Out]

1/f*(1/7*B*a^3*c^3*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)-A*a^3*c^3*(-1/6*(sin(f*x+e
)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)+5/16*f*x+5/16*e)-3/5*B*a^3*c^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+
e)^2)*cos(f*x+e)+3*A*a^3*c^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+B*a^3*c^3*(2+sin(f*
x+e)^2)*cos(f*x+e)-3*A*a^3*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-B*a^3*c^3*cos(f*x+e)+A*a^3*c^3*(f*x+
e))

________________________________________________________________________________________

Maxima [B]  time = 0.992634, size = 356, normalized size = 3.04 \begin{align*} -\frac{35 \,{\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{3} c^{3} - 630 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{3} c^{3} + 5040 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{3} c^{3} - 6720 \,{\left (f x + e\right )} A a^{3} c^{3} + 192 \,{\left (5 \, \cos \left (f x + e\right )^{7} - 21 \, \cos \left (f x + e\right )^{5} + 35 \, \cos \left (f x + e\right )^{3} - 35 \, \cos \left (f x + e\right )\right )} B a^{3} c^{3} + 1344 \,{\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a^{3} c^{3} + 6720 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{3} c^{3} + 6720 \, B a^{3} c^{3} \cos \left (f x + e\right )}{6720 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

-1/6720*(35*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 9*sin(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*A*a^3*c^3 - 630*
(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^3*c^3 + 5040*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^
3*c^3 - 6720*(f*x + e)*A*a^3*c^3 + 192*(5*cos(f*x + e)^7 - 21*cos(f*x + e)^5 + 35*cos(f*x + e)^3 - 35*cos(f*x
+ e))*B*a^3*c^3 + 1344*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^3*c^3 + 6720*(cos(f*x + e)
^3 - 3*cos(f*x + e))*B*a^3*c^3 + 6720*B*a^3*c^3*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.45975, size = 221, normalized size = 1.89 \begin{align*} -\frac{48 \, B a^{3} c^{3} \cos \left (f x + e\right )^{7} - 105 \, A a^{3} c^{3} f x - 7 \,{\left (8 \, A a^{3} c^{3} \cos \left (f x + e\right )^{5} + 10 \, A a^{3} c^{3} \cos \left (f x + e\right )^{3} + 15 \, A a^{3} c^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{336 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/336*(48*B*a^3*c^3*cos(f*x + e)^7 - 105*A*a^3*c^3*f*x - 7*(8*A*a^3*c^3*cos(f*x + e)^5 + 10*A*a^3*c^3*cos(f*x
 + e)^3 + 15*A*a^3*c^3*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 15.9223, size = 682, normalized size = 5.83 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**3,x)

[Out]

Piecewise((-5*A*a**3*c**3*x*sin(e + f*x)**6/16 - 15*A*a**3*c**3*x*sin(e + f*x)**4*cos(e + f*x)**2/16 + 9*A*a**
3*c**3*x*sin(e + f*x)**4/8 - 15*A*a**3*c**3*x*sin(e + f*x)**2*cos(e + f*x)**4/16 + 9*A*a**3*c**3*x*sin(e + f*x
)**2*cos(e + f*x)**2/4 - 3*A*a**3*c**3*x*sin(e + f*x)**2/2 - 5*A*a**3*c**3*x*cos(e + f*x)**6/16 + 9*A*a**3*c**
3*x*cos(e + f*x)**4/8 - 3*A*a**3*c**3*x*cos(e + f*x)**2/2 + A*a**3*c**3*x + 11*A*a**3*c**3*sin(e + f*x)**5*cos
(e + f*x)/(16*f) + 5*A*a**3*c**3*sin(e + f*x)**3*cos(e + f*x)**3/(6*f) - 15*A*a**3*c**3*sin(e + f*x)**3*cos(e
+ f*x)/(8*f) + 5*A*a**3*c**3*sin(e + f*x)*cos(e + f*x)**5/(16*f) - 9*A*a**3*c**3*sin(e + f*x)*cos(e + f*x)**3/
(8*f) + 3*A*a**3*c**3*sin(e + f*x)*cos(e + f*x)/(2*f) + B*a**3*c**3*sin(e + f*x)**6*cos(e + f*x)/f + 2*B*a**3*
c**3*sin(e + f*x)**4*cos(e + f*x)**3/f - 3*B*a**3*c**3*sin(e + f*x)**4*cos(e + f*x)/f + 8*B*a**3*c**3*sin(e +
f*x)**2*cos(e + f*x)**5/(5*f) - 4*B*a**3*c**3*sin(e + f*x)**2*cos(e + f*x)**3/f + 3*B*a**3*c**3*sin(e + f*x)**
2*cos(e + f*x)/f + 16*B*a**3*c**3*cos(e + f*x)**7/(35*f) - 8*B*a**3*c**3*cos(e + f*x)**5/(5*f) + 2*B*a**3*c**3
*cos(e + f*x)**3/f - B*a**3*c**3*cos(e + f*x)/f, Ne(f, 0)), (x*(A + B*sin(e))*(a*sin(e) + a)**3*(-c*sin(e) + c
)**3, True))

________________________________________________________________________________________

Giac [A]  time = 1.30246, size = 219, normalized size = 1.87 \begin{align*} \frac{5}{16} \, A a^{3} c^{3} x - \frac{B a^{3} c^{3} \cos \left (7 \, f x + 7 \, e\right )}{448 \, f} - \frac{B a^{3} c^{3} \cos \left (5 \, f x + 5 \, e\right )}{64 \, f} - \frac{3 \, B a^{3} c^{3} \cos \left (3 \, f x + 3 \, e\right )}{64 \, f} - \frac{5 \, B a^{3} c^{3} \cos \left (f x + e\right )}{64 \, f} + \frac{A a^{3} c^{3} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac{3 \, A a^{3} c^{3} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} + \frac{15 \, A a^{3} c^{3} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x, algorithm="giac")

[Out]

5/16*A*a^3*c^3*x - 1/448*B*a^3*c^3*cos(7*f*x + 7*e)/f - 1/64*B*a^3*c^3*cos(5*f*x + 5*e)/f - 3/64*B*a^3*c^3*cos
(3*f*x + 3*e)/f - 5/64*B*a^3*c^3*cos(f*x + e)/f + 1/192*A*a^3*c^3*sin(6*f*x + 6*e)/f + 3/64*A*a^3*c^3*sin(4*f*
x + 4*e)/f + 15/64*A*a^3*c^3*sin(2*f*x + 2*e)/f